<tagLib name="html" />
<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.ad.manage_ad}</h3>
        <ul class="tab1">
            <li class="current"><a href="__URL__/adList"><span>{$Think.lang.ad.all_ad}</span></a></li>
            <li><a href="__URL__/addAD"><span>{$Think.lang.ad.add_ad}</span></a></li>
            <li><a href="__URL__/locationList"><span>{$Think.lang.ad.all_location}</span></a></li>
            <li><a href="__URL__/addLocation"><span>{$Think.lang.ad.add_location}</span></a></li>
        </ul>
    </div>
    <p class="tips">{$Think.lang.ad.ad_tips}</p>

    <form name="cpform" method="post" action="__URL__/manageAD" id="cpform">
    <input type="hidden" name="op" value="save" />
    <table class="tb tb2">
        <tr>
            <th>{$Think.lang.enable}</th>
            <th>{$Think.lang.title}</th>
            <th>{$Think.lang.ad.ad_location}</th>
            <th>{$Think.lang.ad.ad_format}</th>
            <th>{$Think.lang.start_time}</th>
            <th>{$Think.lang.expire_time}</th>
            <th>{$Think.lang.actions}</th>
            <th width="10%">{$Think.lang.mark}</th>
        </tr>
        <volist name="adList" id="vo">
        <tr class="item">
            <td class="td25"><input class="checkbox" type="checkbox" name="status[{$vo.ad_id}]" value="1" <if condition="$vo.status eq 1">checked></if></td>
            <td><input type="text" class="txt" size="15" name="title[{$vo.ad_id}]" value="{$vo.title}"></td>
            <td><a href="#" title="{$vo.description}">{$vo.identifier}</td>
            <td>{$formats[$vo['format']]}</td>
            <td><empty name="vo.start_time">{$Think.lang.unlimited}<else/>{$vo.start_time|format_date='Y-m-d'}</empty></td>
            <td><empty name="vo.expire_time">{$Think.lang.unlimited}<else/>{$vo.expire_time|format_date='Y-m-d'}</empty></td>
            <td><a class="act" href="__URL__/editAD/ad_id/{$vo.ad_id}" class="act">{$Think.lang.edit}</a></td>
            <td class="td25"><input class="checkbox" type="checkbox" name="mods[{$vo.ad_id}]" value="{$vo.ad_id}"></td>
        </tr>
        </volist>
        <tr class="nobg">
           <td colspan="7">
                <div class="cuspages left"><div class="pages">{$pagination}</div></div>
                <div class="fixsel right"><input type="submit" class="btn" name="advsubmit" value="{$Think.lang.submit}" /></div>
            </td>
            <td><input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'mods')" /><label for="chkall">{$Think.lang.delete}?</label></td>
        </tr>
    </table>
    </form>
</div>

<include file="Public:footer" />

